package cc.rengu.igas.channel.wechat.facade;


import cc.rengu.igas.channel.wechat.facade.request.*;
import cc.rengu.igas.channel.wechat.facade.response.*;
import cc.rengu.igas.channel.wechat.facade.result.Result;

/**
 * 微信支付组件
 */
public interface WechatPayService {

    /**
     * 被扫支付
     *
     * @param wechatConsumeByCardRequest
     * @return 被扫支付结果
     * @throws Exception
     */
    Result<WechatMicropayResponse> micropay(WechatMircopayRequest wechatConsumeByCardRequest) throws Exception;

    /**
     * 统一下单
     *
     * @param wechatUnifiedOrderRequest
     * @return 统一下单结果
     * @throws Exception
     */
    Result<WechatUnifiedOrderResponse> unifiedOrder(WechatUnifiedOrderRequest wechatUnifiedOrderRequest) throws Exception;

    /**
     * 撤销订单
     *
     * @param wechatCancelOrderRequest
     * @return 撤销订单结果
     * @throws Exception
     */
    Result<WechatCancelOrderResponse> cancelOrder(WechatCancelOrderRequest wechatCancelOrderRequest) throws Exception;

    /**
     * 关闭订单
     *
     * @param wechatCloseOrderRequest
     * @return 关闭订单结果
     * @throws Exception
     */
    Result<WechatCloseOrderResponse> closeOrder(WechatCloseOrderRequest wechatCloseOrderRequest) throws Exception;

    /**
     * 查询订单
     *
     * @param wechatQueryOrderRequest
     * @return 查询订单结果
     * @throws Exception
     */
    Result<WechatQueryOrderResponse> queryOrder(WechatQueryOrderRequest wechatQueryOrderRequest) throws Exception;

    /**
     * 退款
     *
     * @param wechatRefundOrderRequest
     * @return
     * @throws Exception
     */
    Result<WechatRefundOrderResponse> refundOrder(WechatRefundOrderRequest wechatRefundOrderRequest) throws Exception;

    /**
     * 单笔退款查询
     *
     * @param wechatQuerySingleRefundRequest
     * @return 单笔退款查询结果
     * @throws Exception
     */
    Result<WechatQuerySingleRefundResponse> querySingleRefund(WechatQuerySingleRefundRequest wechatQuerySingleRefundRequest) throws Exception;


}
